@import './variables.css';

#root {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    color: var(--color-text);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--color-background);
}

.app-header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-md);
    text-align: center;
}

.app-header h1 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-lg);
}

.app-header p {
    margin: 0;
    opacity: 0.9;
}

.controls-panel {
    display: flex;
    gap: var(--spacing-md);
    align-items: end;
    padding: var(--spacing-md);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-group label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.url-input {
    padding: var(--spacing-sm);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-base);
    font-size: var(--font-size-sm);
    min-width: 350px;
}

.url-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.load-button {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-base);
    cursor: pointer;
    font-size: var(--font-size-sm);
    height: fit-content;
}

.load-button:hover {
    background: var(--color-primary-hover);
}

.content-container {
    display: flex;
    flex: 1;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    overflow: hidden;
}

.iframe-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.iframe-panel h3 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--color-text);
}

.lightdash-iframe {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base);
    background: var(--color-white);
}

.iframe-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-base);
    color: var(--color-text-placeholder);
}

@media (max-width: 1024px) {
    .content-container {
        flex-direction: column;
    }

    .iframe-panel {
        height: 400px;
    }

    .controls-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .url-input {
        min-width: auto;
    }
}
